// Function.prototype._bind = function () {
//   let [context, ...args] = [...arguments]
//   if (!context) {
//     context = 'undefined' === typeof window
//             ? global
//             : window
//   }
//   let self = this
//   function Fn () {}
//   Fn.prototype = this.prototype
//   let bound = function () {
//     let res = [...args, ...arguments]
//     // context = this instanceof Fn ? this : context || this
//     return self.apply(context, res)
//   }
//   bound.prototype = new Fn()
//   return bound
// }
Function.prototype._bind = function () {
  let [context, ...args] = [...arguments]
  if (!context) {
    context = 'undefined' === typeof window
            ? global
            : window
  }
  let self = this
  return function () {
    let res = [...args, ...arguments]
    return self.apply(context, res)
  }
}

var name = 'Jack';
function person(age, job, gender){
    console.log(this.name , age, job, gender);
}
var Yve = {name : 'Yvette'};
let result = person._bind(Yve, 22, 'enginner')('female');	
